﻿using System;
using System.Collections.Generic;

namespace Narwhunderful.Aphelia.Framework.Graphics
{

    public class DrawableComponentComparer<T> : IComparer<T> where T : IDrawableComponent
    {
        public virtual int Compare(T component1, T component2)
        {
            if (component1.DrawOrder > component2.DrawOrder) return 1;
            if (component1.DrawOrder < component2.DrawOrder) return -1;
            return 0;
        }
    }

}
